home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1995-07-19 | 5.2 KB | 185 lines |
- > <Journal$Dir>.!Journal
- "Hourglass_Smash"::
- $;" at line "+
- "<Obey$Dir>.ShellLibRT"
- "<Obey$Dir>.ScrapLib"
- 4void1%=
- shell_InstallLib( "<Obey$Dir>.CalLib" )
- 6void2%=
- shell_InstallLib( "<Obey$Dir>.DatePick" )
- 4void3%=
- shell_InstallLib( "<Obey$Dir>.OLELib" )
- shell_FatalError
- "Hourglass_On"
- "Wimp_SlotSize",-1,-1
- progsize%
- pagesize%=1<<10
- freespace%=&8000+progsize%
- =freespace%+pagesize%
- =freespace%
- shell_HeapManagerInit("<Obey$Dir>.",freespace%)
- shell_Init
- *task%=
- shell_WimpInit_I(200,"Journal")
- shell_TraceInit("")
- shell_TraceOn
- shell_ResourcesInit
- app_init
- _closedown% =
- changed% =
- "Hourglass_Off"
- shell_Error
- shell_Action(
- shell_Poll_I(0,task%))
- _closedown%
- shell_ScrapRemoveDir(
- shell_GetAppName )
- shell_Exit:
- app_init
- SetUp_Menus
- SetUp_Windows
- SetUp_IconBar
- shell_ScrapCreateDir(
- shell_GetAppName )
- SetUp_Menus
- void1%,void2%
- 2FMenuHandle_IconBar%=
- shell_MenuNew(
- shell_MessageNoArgs("MTIBar"))
- 3IMenuItem_Info% =
- shell_MenuAdd(0,
- shell_MessageNoArgs("Info"),"")
- 4Yvoid4% =
- shell_MenuAdd(0,
- shell_MessageNoArgs("Quit"),"_MenuSelect_Quit")
- shell_AttachMenuDBox(MenuItem_Info%,"progInfo","_PreOpenInfo","")
- shell_CreateWindowStatic("xfer_send",xfer%)
- 8CMenuHandle_Main%=
- shell_MenuNew(
- shell_MessageNoArgs("MTIBar"))
- 9IMenuItem_Info% =
- shell_MenuAdd(0,
- shell_MessageNoArgs("Info"),"")
- :IMenuItem_Save% =
- shell_MenuAdd(0,
- shell_MessageNoArgs("Save"),"")
- ;Yvoid5% =
- shell_MenuAdd(0,
- shell_MessageNoArgs("Quit"),"_MenuSelect_Quit")
- shell_AttachMenuDBox(MenuItem_Info%,"progInfo","_PreOpenInfo","")
- shell_AttachSubMenu(MenuItem_Save%,xfer%,"")
- SetUp_Windows
- shell_CreateWindowStatic("mainw",mainw%)
- shell_AttachDataSave(xfer%,2,&100,&FFF,1,"_DataSave")
- shell_AttachPopupDatePicker(mainw%,1,-1,"_A")
- shell_CalendarGetTodaysDate(date%,mont%,year%)
- shell_IconPutData(mainw%,1,
- shell_CalendarDateString(date%,mont%,year%),
- shell_AttachClickSelect(mainw%,-1,"_clickmain")
- shell_AttachMenu(mainw%,-1,MenuItem_Save%,0,0,0)
- H*mon$=
- shell_CalendarMonthString(mont%)
- name$=
- (date%)+"/"+mon$
- shell_IconPutData(xfer%,1,name$,
- SetUp_IconBar
- NSsicon=
- shell_Iconbar(-1,"!"+
- shell_GetAppName,"",120,MenuHandle_IconBar%,0,0,0)
- shell_AttachHelpTag(-1,sicon,"iconbar")
- shell_AttachClickSelect(-1,sicon,"_ClickSelect_IconBar")
- _DataSave(fullname$)
- shell_IconPutData(xfer%,1,name$,
- savefile(fullname$)
- changed%=
- _clickmain(wh%,icon%)
- file_handle%, file_buffer%, OLE_file_name$ , X%
- \Xfile_buffer% =
- shell_HeapBlockFetch( 256 ):filebuff% =
- shell_HeapBlockFetch( 256 )
- changed%=
- $file_buffer% =""
- icon%
- Send today's file to Editor
- aK OLE_file_name$ = "<Wimp$ScrapDir>." +
- shell_GetAppName + ".JournFile"
- shell_OLEDeLinkFile( OLE_file_name$ )
- shell_FileExists(
- _OpenPath)=
- X%=
- _OpenPath
- f7 $file_buffer% =
- shell_IconGetData(mainw%,1)+
- g! X%=
- "<Obey$Dir>.JournFile"
- j+ $file_buffer% =$file_buffer% +
- Date$=$file_buffer%
- Date$=
- Date$)
- $file_buffer%=Date$
- p' file_handle% =
- ( OLE_file_name$ )
- "OS_GBPB", 2, file_handle%, file_buffer%,
- ( $file_buffer% )
- #file_handle%
- ( "SetType " + OLE_file_name$ + " FFF")
- shell_MessageSendDataLoad( &FFF, OLE_file_name$ )
- shell_OLELinkFile( OLE_file_name$, "_reload" )
- shell_EnsurePoll
- key_ctrl_down% = &1AE
- "Wimp_ProcessKey",key_ctrl_down%
- _A (T$)
- }; date%=
- T$,2)):mont%=
- T$,5,2)):year%=
- ("19"+
- T$,2))
- shell_IconPutData(mainw%,1,
- shell_CalendarDateString(date%,mont%,year%),
- _OpenPath
- *mon$=
- shell_CalendarMonthString(mont%)
- ;=" <Obey$Dir>."+
- (year%)+"."+mon$+"."+
- (date%)+"/"+mon$
- _PreOpenInfo(wh%)
- shell_IconPutData(wh%,0,
- shell_MessageNoArgs("progInfo0"),0)
- shell_IconPutData(wh%,1,
- shell_MessageNoArgs("progInfo1"),0)
- shell_IconPutData(wh%,2,
- shell_MessageNoArgs("progInfo2"),0)
- shell_IconPutData(wh%,3,
- shell_MessageNoArgs("progInfo3"),0)
- _ClickSelect_IconBar(wh%,icon%)
- shell_OpenWindowStatic(mainw%)
- _MenuSelect_Quit(blk%)
- _closedown%=
- _reload(file$)
- file_length%, buff% ,X%
- shell_Tracef0("reloading file0001")
- -file_length% =
- shell_FileLength( file$ )
- 1buff% =
- shell_HeapBlockFetch( file_length% )
- ("LOAD " + file$ + " " +
- ~( buff% ) )
- Store day's diary entry
- $filebuff%=
- _OpenPath
- "OS_File",10,$filebuff%,&fff,,buff%,buff%+file_length%
- shell_HeapBlockReturn( buff% )
- shell_DoBackgroundTask
- shell_OLEScanLinkedFiles
- savefile(filsave$)
- file_length%, buff% ,X%
- Kfile_length% =
- shell_FileLength( "<Wimp$ScrapDir>.Journal.JournFile" )
- 1buff% =
- shell_HeapBlockFetch( file_length% )
- ("LOAD <Wimp$ScrapDir>.Journal.JournFile " +
- ~( buff% ) )
- $filebuff%=filsave$
- "OS_File",10,$filebuff%,&fff,,buff%,buff%+file_length%
- shell_HeapBlockReturn( buff% )
-